Advertisement

hxRender version 0.7 suggestions

Started by December 10, 2004 08:26 AM
6 comments, last by PnP Bios 20 years, 2 months ago
Here is what I was thinking of adding for the next release of my lib. -utility functions for loading and displaying of cell sheets. -copying pixels off of the screen and into a hxSurface. -fixing the bug involved with setting up the screen viewport. (this was still setup to do cartesian coordinates and not screen coordinates) Any suggestions? Oh, and in a couple of weeks, I should be getting back to writing tutorials. Winter break, baby!
HxRender | Cornerstone SDL TutorialsCurrently picking on: Hedos, Programmer One
I think some 2D Programmers would like a hxBlitSurfaceRotated(float deg); function or something like that. I was looking at the .6 source, and I figured that all you need to do in OpenGL is something like:
----
glPushMatrix();
glTranslate(x,y,0.0f);//not exactly sure what values for x and y
glRotatef(degrees,0,0,1);//rotate matrix
hxBlitSurface( source, sRect, dRect, blendColor );//draw the image
glPopMatrix();
----
I realize that this was demonstrated using the mouse pointer in the .6 release, but it would be nice to have it wrapped up in a function so you could call it almost like hxBlitSurface, but with the addition of 'float degrees' so the surface could be draw rotated.

Also, when you mentioned:
Quote:
copying pixels off of the screen and into a hxSurface.

Does that mean finishing up the function that allows you to copy an SDL_Surface* into a hxSurface*. If you could make it so that it takes existing transparency or alpha in account I think that it would be a great addition for the next release as well.

Keep up the good work on the library :)
Advertisement
Make a good using it and don't stop until you've finished. I think too many people now make engines, not games.
Rob Loach [Website] [Projects] [Contact]
wryzy, that sounds like a good idea. I will finish that SDL surface conversion function.

As for a rotation around the center... Thats doable. I'll play around with it.
And what I mean by being able to copy pixels off the screen is to use glReadPixels, and shove a region on the screen into an off screen surface.
This will make it easier to do scene transitions and stuff like that.
HxRender | Cornerstone SDL TutorialsCurrently picking on: Hedos, Programmer One
Quote:
Original post by Rob Loach
Make a good using it and don't stop until you've finished. I think too many people now make engines, not games.


Rob, those that can't do, teach.

I can't make games. I don't have the desire to sit around and generate content. I am at the point where I need a team to get anything done.
HxRender | Cornerstone SDL TutorialsCurrently picking on: Hedos, Programmer One
Quote:
Original post by Rob Loach
Make a good using it and don't stop until you've finished. I think too many people now make engines, not games.
[grin]
That's definitly me, but there's good logic behind making engines first than games, you can look at my web page and read about that [wink]. Anyways I have to ask, what is a hxSurface? Are you talking about hexagonal tiles, commonly used in Isometric games?
Advertisement
Quote:
Original post by Drew_Benton
Anyways I have to ask, what is a hxSurface? Are you talking about hexagonal tiles, commonly used in Isometric games?

An hxSurface is just a data structure that PnP uses like a texture to blit images with OpenGL.
This is what is looks like:
----
typedef struct hxSurface
{
unsigned int w;
unsigned int h;
unsigned int wPad; //new!
unsigned int hPad; //The width and height of the object to padd it to a po2 texture.
unsigned int texID;

unsigned char *pixeldata;

} hxSurface;
----
You can probably guess what each of the fields are for
Ok, I have decided against doing a draw rotated function, atleast in this release. If I do actually decide to do it, it will be part of hxUtility, and not hxRender.

I think that in the future, versions of hxRender will have the utility functions in a seperate library than the render functions. This will make it easier on me because I won't have to rewrite the whole library when I make one little change.

hopefully, I should have a website up for the library, instead of just a link. again, anybody interested in helping me document this thing should let me know.
HxRender | Cornerstone SDL TutorialsCurrently picking on: Hedos, Programmer One

This topic is closed to new replies.

Advertisement