GithubHelp home page GithubHelp logo

sdl2_opengl3's Introduction

SDL2 OpenGL3 Example

This project aims to be a simple example for using SDL2 and OpenGL 3.2. In addition it should also be useful for experimenting with shader development.

Alt text

Installation

Install XCode & CLI tools.

Install Development Libraries for SDL2: http://www.libsdl.org/download-2.0.php

OSX

Ubuntu

sudo apt-get install freeglut3 build-essential libgl1-mesa-dev mesa-common-dev xorg-dev libudev-dev libts-dev libgl1-mesa-dev libglu1-mesa-dev libasound2-dev libpulse-dev libopenal-dev libogg-dev libvorbis-dev libaudiofile-dev libpng12-dev libfreetype6-dev libusb-dev libdbus-1-dev zlib1g-dev libdirectfb-dev

Get SDL2, make and install http://www.libsdl.org/hg.php

Exporting Objects from Blender

Add texture coords to object

  1. Select your object.

  2. 3D View toolbar -> Edit Mode -> Mesh -> Faces -> Triangulate Faces (Ctl T)

  3. Outliner -> Object Data -> UV Maps -> Add

  4. Outliner -> Texture -> Show material textures -> Tex

    1. Type = Image or Movie

    2. Mapping -> Coordinates = UV

    3. Image -> Open (test.bmp)

  5. 3D View -> Edit Mode -> Edge Select

    1. (click where you want a seam)

    2. Mesh Tools -> UV Mapping -> Mark Seam

    3. (repeat as needed)

    4. Select all faces

  6. UV/Image Editor

    1. Browse image to be linked -> test.bmp

    2. UVs -> Unwrap

  7. File -> Export -> Standord (.ply)

Recomended Reading

3D Math Primer for Graphics and Game Development

OpenGL Shading Language

Credits

Original OpenGL 3 code

Original PLY code

PLY objects created using blender

Test pattern for texture mapping

Original BMP laoding code

Original surface local tangent code

sdl2_opengl3's People

Contributors

hurricanerix avatar

Stargazers

 avatar  avatar

Watchers

 avatar

sdl2_opengl3's Issues

Document libraries needed to compile from scratch

bfosberry@ForeverAlone:~/workspace/sdl2_opengl3$ make
INFO: Compiling 'src/main.c' to 'obj/main.o'...
src/main.c:33:20: fatal error: GL/gl3.h: No such file or directory
compilation terminated.
make: *** [obj/main.o] Error 1

I'm guessing there are few libs I'll be missing <3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.