Skip to content

Commit

Permalink
Clean up in SDL_Texture and SDL_Renderer
Browse files Browse the repository at this point in the history
Apply cleanups suggested by Martin

Fixes #8995
  • Loading branch information
jecisc committed May 9, 2024
1 parent 9a4a546 commit 805871b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
11 changes: 1 addition & 10 deletions src/OSWindow-SDL2/SDL_Renderer.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@ SDL_Renderer >> copy: texture srcRect: srcRect dstRect: dstRect [
{ #category : 'rendering' }
SDL_Renderer >> createTextureFormat: format access: access width: width height: height [

^ self
primCreateTextureFormat: format
access: access
width: width
height: height
^ self ffiCall: #( SDL_Texture SDL_CreateTexture #( self #, Uint32 format #, int access #, int width #, int height ) )
]

{ #category : 'initialization' }
Expand Down Expand Up @@ -136,11 +132,6 @@ SDL_Renderer >> present [
^ self ffiCall: #( void SDL_RenderPresent ( self ) )
]

{ #category : 'private' }
SDL_Renderer >> primCreateTextureFormat: format access: access width: width height: height [
^ self ffiCall: #( SDL_Texture SDL_CreateTexture ( self , Uint32 format , int access , int width , int height ) )
]

{ #category : 'initialization' }
SDL_Renderer >> primDestroy [
^ self ffiCall: #( void SDL_DestroyRenderer ( self ) )
Expand Down
5 changes: 0 additions & 5 deletions src/OSWindow-SDL2/SDL_Texture.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ SDL_Texture >> destroy [
handle beNull
]

{ #category : 'initialization' }
SDL_Texture >> initialize [
self autoRelease
]

{ #category : 'pixels handling' }
SDL_Texture >> lockPixels: pixels pitch: pitch [
^ self ffiCall: #( int SDL_LockTexture ( self , void* 0 , void** pixels , int* pitch ) )
Expand Down

0 comments on commit 805871b

Please sign in to comment.