Giter Club home page Giter Club logo

oogl's People

Contributors

alpynedreams avatar fox32 avatar jookia avatar larsmans avatar overv avatar petersenaden avatar rkswanson avatar wmcnamara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oogl's Issues

ShadowMapping Sample LightDepth from Texture Incorrect on Windows 10 VS x86 Debug

I have the ShadowMapping sample running on my Surface Laptop Windows 10 64 via Visual Studio linking to OpenGL32.lib for x86 Debug. Initially the depth test of "if ( lightDepth < lightCoord.z - 0.0001 )" was always true because lightDepth was always zero. I had to change the normalFrag program lightDepth sampling to reference "x" instead of "z" from the texLight texture (See below)

float lightDepth = texture( texLight, lightCoord.xy ).z; // ALWAYS RETURNED 0 FOR ME
float lightDepth = texture( texLight, lightCoord.xy ).x; // FIXED THE PROBLEM

I don't know enough about binding depth buffers to samplers to know if this is a bug in the sample, or a Windows/platform specific issue. Would be curious to know why though.

OOGL doesn't play well with SDL2...

I'm trying to use SDL2 with OOGL and I've copied the relevant parts of the triangle sample. It gives a segmentation fault at the first call to create the vertex shader. This must have something to do with using SDL2 and not creating a window. Is there an example for using OOGL with other windowing libraries?

Thank you.

If i not place #include <GL/OOGL.hpp> statement just before my main function, compiler gives error messages

#include <Garbage.H>
#include <Alert.H>
#include <Game.H>

#include <GL/OOGL.hpp>

int main(void)
{

}

Is okay but i can't do it like that because my libraries need GL namespace and putting include statement above makes compiler give error

In the first statement of Garbage.H, for example, i make few definitions for my personal preferences, like writing Integer instead of int.
#define Integer int

When i put the include statement above, compiler gives a meaningless error message:

include/Garbage.H:20:17: error: expected ‘)’ before ‘int’
 #define Integer int

Even if i remove the define statement, it gives the a similar error from another file. What is the problem?

License

Would you consider relicensing (or adding an alternative license) this with the "Boost Software License" (https://opensource.org/licenses/BSL-1.0)

I am trying to make a library like this for D (dlang.org) and I would like to base my code on your OOGL library rather than starting over myself. But, I am needing to use the BSL license. The BSL license is very common particularly with D libraries.

Thanks for Considering,
Jonathan

Use libpng 1.5.

The current libpng is 1.2, which is out of date. When doing an experimental CMake port, my system's libpng was found incompatible with the bundled one. This may cause trouble in the future.

Modular design

Since OOGL is now including an image loader, as well as a mesh loader, the original concept of a 'Object-oriented OpenGL wrapper' has been far exceeded.

My proposal is a more modular design, in which the user (or developer) can use a tool of sorts to select which 'modules' they would like to have built in.

Defines to disable the reference counting system

The reference counting system isn't useful in every case. (But is probably easier for beginners!)

Sometimes users don't need the overhead of a reference counting system (or the user want to use shared_ptr, with much more features and higher efficiency). Or the user want to use unique_ptr, without all the overhead. Or raw pointers (for what reasons ever). The user should have more freedom about the resource lifetime system he want to use.

If the user don't need the GC system, he should be able to declare a define before compiling the library. All GC parts should be exclude in the build, and copy, assignment and move constructors should be disabled.

Or is there any reason for the GC system to be necessary for the functionality of the library that I can't see?

x64 compilation for windows platforms

Simple as that, how can I build and use this library into a 64 bits application?

When i do that, i receive some errors related with GWL_USERDATA preprocessor in Window_Win32.cpp file that it is not defined.

Any suggestion?
Thanks.

antialias is not working

hi, i have encountered a problem :

i write the following code the close antialias effect:

GL::Context& gl = window.GetContext(32, 24, 8, 0);

and 0 represent antialias is closed (antialias = 0)

// Choose final pixel format
const int pixelAttribs[] =
{
	WGL_DRAW_TO_WINDOW_ARB, GL_TRUE,
	WGL_SUPPORT_OPENGL_ARB, GL_TRUE,
	WGL_DOUBLE_BUFFER_ARB, GL_TRUE,
	WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB,
	WGL_COLOR_BITS_ARB, color,
	WGL_DEPTH_BITS_ARB, depth,
	WGL_STENCIL_BITS_ARB, stencil,

//following two line should work but do nothing
	WGL_SAMPLE_BUFFERS_ARB, antialias > 1 ? GL_TRUE : GL_FALSE,
	WGL_SAMPLES_ARB, antialias > 1 ? antialias : 0,
	0
};

but i still got the blured triangle edge

2

anyway to solve this?

what i actually want :
1

Checking if the resource is belong to the context

It seems the library does not check if the object is belong to the context.
GL::Context& gl = window.GetContext();
GL::VertexBuffer vbo(vertices, sizeof(vertices), GL::BufferUsage::StaticDraw);
GL::VertexArray vao;
vao.BindAttribute(program.GetAttribute("position"), vbo, GL::Type::Float, 2, 0, 0);
gl.DrawArrays(vao, GL::Primitive::Triangle, 0, 3);

I suggest making DrawArray a static method in Context.

And it is not safe if I directly copy one texture from another context.
Texture contextATexture=contextBTexture;

Use premake.

Premake will generate project files which you can then include in the repo and work across all platforms rather than having to have possibly out-of-sync projects.

Out of interest I ported the entire system to CMake but in the end it seemed to add too much complexity when the goal of OOGL is to be simple.

CMake build system

Hi!
Thank you for your project!
The question is super easy: did you think about moving to the CMake build system?

As I can see, this project doesn't look like a big, complex project which required the same build system.
I mean, it will not be so hard to integrate CMake into this project.

If you aren't skilled in CMake, I could pay as much time as possible.

To make the CMake project, we can create new branch with the following changes:

  • Change the project directories structure like that:
 1. | cmake/               | CMake tools and utils
 2. | OOGL/                | Main project directyr
 3. | ├── include/         |
 4. | ├── src/             |
 5. | ├── samples/         |
 6. | └── CMakeLists.txt   | CMake lists which will build GL, Math, Utils and Window targets
 7. | deps/                |
 8. | ├── libjpeg/         |
 9. | ├── libpng/          |
10. | ├── zlib/            |
11. | └── deps.cmake       |
12. | .gitignore           |
13. | CMakeLists.txt       |
14. | LICENSE              |
15. | README.md            |
16. | TODO.md              |
  • Support building the project as subdirectory and using find_library;

If you'll be happy to use CMake, I may try to work a little around it in a cmake_support branch or etc.

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.