Search found 198 matches

by RandomDever
Fri Dec 10, 2010 1:23 pm
Forum: Programming Discussion
Topic: OpenGL Texture to SDL_Surface
Replies: 24
Views: 2548

Re: OpenGL Texture to SDL_Surface

Alright first of all let me say the problem is solved I'm just going to include an SDL_Surface in my texture struct. As for the mentioning of using SDL and OpenGL rendering at the same time, that was not my intention at all. I just wanted to be able to modify the texture like applying a clip ( which...
by RandomDever
Tue Dec 07, 2010 7:29 am
Forum: Programming Discussion
Topic: OpenGL Texture to SDL_Surface
Replies: 24
Views: 2548

Re: OpenGL Texture to SDL_Surface

@ MrDeathNote Yeah I was hoping for runtime pixel manipulation but I guess I'll have to do without it at least for a while.
At least you tried.
by RandomDever
Tue Dec 07, 2010 4:19 am
Forum: Programming Discussion
Topic: OpenGL Texture to SDL_Surface
Replies: 24
Views: 2548

Re: OpenGL Texture to SDL_Surface

@ MrDeathNote So your saying there is no way to convert it?
by RandomDever
Tue Dec 07, 2010 12:48 am
Forum: Programming Discussion
Topic: OpenGL Texture to SDL_Surface
Replies: 24
Views: 2548

Re: OpenGL Texture to SDL_Surface

@ dandymcgee For pixel Maniplation. It's coming from an already loaded image file. @ N64vSNES Because that would use more memory because not all of the textures I am going to use will need to have an SDL_Surface. It's okay if you have a little room for overhead but I want my new engine to be perfect...
by RandomDever
Mon Dec 06, 2010 1:40 am
Forum: Programming Discussion
Topic: OpenGL Texture to SDL_Surface
Replies: 24
Views: 2548

OpenGL Texture to SDL_Surface

Is there any way to take an openGL texture and convert it into an SDL_Surface?
by RandomDever
Tue Oct 26, 2010 2:08 am
Forum: Game Development
Topic: OpenGL Help
Replies: 18
Views: 2661

Re: OpenGL Help

Thank you so much it works now!!!!!! :mrgreen: :mrgreen: :mrgreen:
by RandomDever
Mon Oct 25, 2010 10:30 pm
Forum: Game Development
Topic: OpenGL Help
Replies: 18
Views: 2661

Re: OpenGL Help

How do I set A blend mode and what blend mode should I use?
by RandomDever
Mon Oct 25, 2010 12:44 am
Forum: Game Development
Topic: OpenGL Help
Replies: 18
Views: 2661

Re: OpenGL Help

It has a black background instead of a transparent one.
Well what I did is in Paint .NET I have a background color of a fully transparent black.
And I'm not color keying I have a .png that has transparency but it won't render correctly.

EDIT: Is it a problem with Paint .NET?
by RandomDever
Sun Oct 24, 2010 9:31 pm
Forum: Game Development
Topic: OpenGL Help
Replies: 18
Views: 2661

Re: OpenGL Help

OpenGL alpha blending ;) ^this. However, if you want to get more into things like rendering to a texture, that's possible too, it's just more complicated and I can't really think of many applications offhand. Well I'm not entirely sure how blend works but if what I read around the internet was true...
by RandomDever
Sun Oct 24, 2010 9:21 pm
Forum: Game Development
Topic: OpenGL Help
Replies: 18
Views: 2661

Re: OpenGL Help

Load Texture: GLtexture2d Video::LoadTexture( const char *filename ) { //Create the nessasary variables SDL_Surface *surface; GLuint textureid; int mode; GLtexture2d texture; //Load the specified image into the SDL_Surface *surface variable surface = IMG_Load( filename ); //texture.filename = filena...
by RandomDever
Sun Oct 24, 2010 9:17 pm
Forum: Game Development
Topic: OpenGL Help
Replies: 18
Views: 2661

Re: OpenGL Help

This post was a glitch.
by RandomDever
Sun Oct 24, 2010 12:06 am
Forum: Game Development
Topic: OpenGL Help
Replies: 18
Views: 2661

Re: OpenGL Help

I *think* you have to color key it using SDL (if that's the library you're using) and then feed the pixel data into an OpenGL texture. I'm not sure, but the code at the bottom could probably help: http://www.gamedev.net/community/forums/topic.asp?topic_id=517739 Tried it didn't work. Tried blend, d...
by RandomDever
Wed Oct 20, 2010 9:32 pm
Forum: Game Development
Topic: OpenGL Help
Replies: 18
Views: 2661

OpenGL Help

How do you do do pixel manipulation with OpenGL textures.
All I want to do is have a color key function so it removes all of a certain color and sets it alpha or whatever to 0.
I've read it has something to do with glGetTexImage() but most people skip 2D stuff and jump to 3D so IDK.
by RandomDever
Thu Oct 14, 2010 5:36 pm
Forum: Programming Discussion
Topic: OpenGL Textures Disappear
Replies: 17
Views: 1730

Re: OpenGL Textures Disappear

I'm not sure I see what you're trying to do or why it should be so unnecessarily complicated. When the mode switch happens, any pointers to assets you have (had) will be gone and dead. Whatever method you used in your initialization step to add textures to the SDL simply needs to be called again. W...
by RandomDever
Thu Oct 14, 2010 4:28 pm
Forum: Programming Discussion
Topic: OpenGL Textures Disappear
Replies: 17
Views: 1730

Re: OpenGL Textures Disappear

The reason this happens is because on a resize, minimize, or mode switch, SDL *literally* makes an entirely new window, which is just stupendously silly. Yes. Yes it is. :| Well instead of doing your hack my last resort is to use lists and have my 'LoadTexture()' function add a pointer to the textu...